<p style="margin: 5px 0pt;"><%=link_to  '测试管理' , :action=>"index"%>>>
<%=link_to  '创建复杂倾向测试' , :action=>"new"%> >> </p>
<div id="m">
 <div id="info">
<font color="blue"> 创建步骤：创建测试 >> 添加倾向 >>  添加章节  >><font color="red">添加章节对应倾向结果</font> >> 添加问题 >> 完成 </font>
 </div><br />
<form id="addtrend" name="form3"action="/surveys/surveys/new_complete" method="post" 
onsubmit=""  class="required-validate">
         <%= tag(:input, :type => "hidden", :name => request_forgery_protection_token.to_s, 
                 :value => form_authenticity_token) -%> 
         <% i=1 -%>
        <input type="hidden" name="t_id" value=<%=@test.id%>></input>
            <% for p in @parts -%> 
        第&nbsp;&nbsp;<%=i %>&nbsp;&nbsp; 部分----<%=p.name%> <br/><br/>
             <% j =1%>
               <% for t in @trends -%>
             &nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;第&nbsp;&nbsp;<%=j %>&nbsp;&nbsp; 种倾向-----<%=t.name%><br />
             &nbsp;&nbsp;&nbsp;&nbsp;名&nbsp;&nbsp;称&nbsp;&nbsp;&nbsp;：
        <input name="report[part<%=i.to_s%>][trend<%=j.to_s%>][name]" type="text" class="required min-length-1"/><br/> 
        <input type="hidden" name="report[part<%=i.to_s%>][trend<%=j.to_s%>][test_id]" value=<%=p.survey_id%>></input>
        <input type="hidden" name="report[part<%=i.to_s%>][trend<%=j.to_s%>][part_id]" value=<%=p.id%>></input>
        <input type="hidden" name="report[part<%=i.to_s%>][trend<%=j.to_s%>][trend_scales_id]" value=<%=t.id%>></input>
            &nbsp;&nbsp;explanation:<br />&nbsp;&nbsp;&nbsp;&nbsp&nbsp;
         <textarea cols="50" rows="5"  id="descpart<%=i.to_s%>trend<%=j.to_s%>" 
              name="report[part<%=i.to_s%>][trend<%=j.to_s%>][description]" 
              class="required" style="width:60;height:20;border: 1px solid"/></textarea><br />
              solution:<br />&nbsp;&nbsp;&nbsp;&nbsp;:
         <textarea cols="50" rows="5"  id="solupart<%=i.to_s%>trend<%=j.to_s%>" 
             name="report[part<%=i.to_s%>][trend<%=j.to_s%>][solution]" 
                class="required" style="width:100;border: 1px solid"/></textarea><br/><br/>
             <% j= j+1-%>
            <% end -%>
            <% i=i+1 -%>
          <% end -%>
        <input type="submit" value="下一步>>"   style="margin-left: 250px"/><br />
    </form>
</div>

